import request from "@/utils/request";

// 请求医院设置数据
export const reqhospitalSet = (page = 1, limit = 5) => {
  return request.get(`/admin/hosp/hospitalSet/${page}/${limit}`);
};

// 添加数据
export const reqAddhospital = (data) => {
  return request.post(`/admin/hosp/hospitalSet/save`, data);
};

// 删除单条医院数据
export const reqRemove = (id) => {
  return request.delete(`/admin/hosp/hospitalSet/remove/${id}`);
};

// 医院设置 查询
export const reqSearch = (page = 1, limit = 5, hosname, hoscode) => {
  return request.get(`/admin/hosp/hospitalSet/${page}/${limit}`, {
    params: {
      hosname,
      hoscode,
    },
  });
};

// 修改医院 设置
export const reqUpdateHospitalSet = (data) => {
  return request.put(`/admin/hosp/hospitalSet/update`, data);
};

// 根据id 获取医院列表
export const reqHospitalSetById = (id) => {
  return request.get(`admin/hosp/hospitalSet/get/${id}`);
};

// 批量删除
export const reqbatchRemove = (data) => {
  return request.delete(`/admin/hosp/hospitalSet/batchRemove`, { data });
};
